package com.codingman.springdemo3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo2 {

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
		Foo2 f = (Foo2) context.getBean("fooBean2");
		
		System.out.println("calling first Foo2.abc() ...");
		try {
			f.abc(19);
		} catch (Exception e) {
			System.out.println(e);
		}
		
		System.out.println("calling second Foo2.abc() ...");
		try {
			f.abc(11);
		} catch (Exception e) {
			System.out.println(e);
		}
	}
}
